﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace ExampleWpfApp
{
	/// <summary>
	/// App.xaml 的交互逻辑
	/// </summary>
	public partial class App : Application
	{
		public static void ExecConsoleApp(string arg)
		{
			//获取本项目（WPF）可执行文件的路径
			string path = System.Reflection.Assembly.GetExecutingAssembly().Location;
			//改为控制台程序 ConsoleHello.exe 的路径
			string path1 = path.Replace("WPF项目名", "控制台项目名");
			System.Diagnostics.Process.Start(path1, arg);
		}

	}


}
